{% extends "base.html" %}
{% block main %}
<table width="600" align="center" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF">
    <form method="POST" action="{% url django.contrib.auth.views.login %}">
        <tr>
            <td colspan="2" bgcolor="#d1d9e2">用户登录</td>
        </tr>
        {% if form.errors %}
        <tr>
            <tr colspan="2" bgcolor="#EEEEEE">
            {{ form.username.errors }}
            {{ form.password.errors }}
            {{ form.errors }}
            </tr>
        </tr>
        {% endif %}
        <tr bgcolor="#EEEEEE">
            <th>{{ form.username.label_tag }}</th>
            <td>{{ form.username }}</td>
        </tr>
        <tr bgcolor="#EEEEEE">
            <th>{{ form.password.label_tag }}</th>
            <td>{{ form.password }}</td>
        </tr>
        <tr bgcolor="#EEEEEE">
            <td colspan="2"><input type="submit" id="submit" value="登录" /></td>
        </tr>
        <input type="hidden" name="next" value="{% url index %}" />
    </form>
</table>
{% endblock %}